From: Michael Albinus Date: Thu, 3 Sep 2009 15:21:47 +0000 (+0000) Subject: * tramp.texi (Frequently Asked Questions): New item for X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~10668 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=3dcf3cc5d0487423db681516a8867246dcee1bb8;p=emacs.git * tramp.texi (Frequently Asked Questions): New item for emacsclient (extended). --- diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 5ac95d9ea73..2021a6ecd0d 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -3242,6 +3242,21 @@ emacsclient @trampfn{ssh, user, host, /file/to/edit} @end example @code{user} and @code{host} shall be related to your local host. + +If you want to use Emacs Client also as editor for other programs, you +could write a script @file{emacsclient.sh}: + +@example +#!/bin/sh +emacsclient @trampfn{ssh, `whoami`, `hostname --fqdn`, $1} +@end example + +Then you must set the environment variable @code{EDITOR} pointing to +that script: + +@example +export EDITOR=/path/to/emacsclient.sh +@end example @end ifset